﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Login_Logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session.SetCurrentUser(null);
        if (Request.Cookies["UserName"] != null)
        {
            HttpCookie myCookie = new HttpCookie( "UserName" );
            myCookie.Expires = DateTime.Now.AddDays( -1 );
            Response.Cookies.Add( myCookie );
            Response.Redirect( "~/HomePage.aspx" );
        }
        Response.Redirect("~/HomePage.aspx");
    }
}